﻿using AbpApplication.AppServices;
using AbpApplication.InPut;
using AbpEntityFrameworkcore.DbContext;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;

namespace AbpWebapi.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class UserController : ControllerBase
    {

        private readonly MyUserService service;

        public UserController(MyUserService service)
        {
            this.service = service;
        }



        [HttpPost]
        public async Task<ApiResponse> RegisterUser(InPut_UserService inPut) => await service.RegisterUser(inPut);
        [HttpPost]
        public async Task<ApiResponse> LoginUser(InPut_UserService2 inPut)=>await service.LoginUser(inPut);
        [HttpPost]
        public async Task<ApiResponse> UpdatePassWord(InPut_UserService3 inPut)=>await service.UpdatePassWord(inPut);
        [HttpPost]
        public async Task<ApiResponse> UpdateUserInfo(InPut_UserService4 inPut)=>await  service.UpdateUserInfo(inPut);
        [HttpPost]
        public async Task<ApiResponse> FindOneUserInfo(string UserName)=>await service.FindOneUserInfo(UserName);
        [HttpPost]
        public async Task<ApiResponse> UpdateRole(InPut_UserService5 inPut)=>await service.UpdateRole(inPut);
    }
}
